package com.android.djlmapp.dialog;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.TextView;

import com.android.djlmapp.R;

/**
 * 活体检测验证弹窗
 */
public class MyUsualyDialogggg extends Dialog {

    public MyUsualyDialogggg(Context context) {
        super(context, R.style.QiaoDaoDialogStyle);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.again_yanzheng_dialog);
        TextView btn = (TextView) findViewById(R.id.again_yanzheng_btn_again);
        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                // 重新开始验证
                cancel();
            }
        });

        Window window = getWindow();
        WindowManager.LayoutParams params = window.getAttributes();
        params.gravity = Gravity.CENTER;
        window.setAttributes(params);
    }
}